#define allerror t7
/* zhb */
zhb:
	TTYDBG("Testing...\r\n")
	move allerror,zero
	la	a0, start
	li	a1, 0xbfc00000
	la	a2, _edata
//        or      a0, 0xa0000000
//        or      a2, 0xa0000000
/*	subu	s6, a2, a0*/
/*	srl	s6, s6, 2*/

	move	t0, a0
	move	t1, a1
	move	t2, a2
	/* copy text section */
	
1:	lw	t4, 0(t1)
	nop
	lw	t5, 0(t0)
	addu	t0, 4
	addu	t1, 4
	beq	t4, t5, 2f
	nop
	move	a0, t0
	subu	a0, 4
	bal	hexserial
	nop
	TTYDBG	(" ")
	move	a0, t4
	bal	hexserial
	nop
	TTYDBG	(" ")
	move	a0, t5
	bal	hexserial
	nop
	TTYDBG	(" ")
	xor a0,t4,t5
	or allerror,a0
	bal	hexserial
	nop	
	TTYDBG	(" ")
	move a0,allerror
	bal hexserial
	nop
	TTYDBG	("\r\n")
2:	bne	t2, t0, 1b
	nop
	TTYDBG	("test ok!\r\n")
//3:	beqz	zero, 3b
	nop
